//
//  MyCodeViewCell.m
//  PosApp
//
//  Created by 刘萍 on 2018/10/10.
//  Copyright © 2018年 李英新. All rights reserved.
//

#import "MyCodeViewCell.h"

@implementation MyCodeViewCell

- (void)setModel:(CodeModel *)model {
    self.CellClassLabel.text = [NSString stringWithFormat:@"%@",model.goods_name];
    self.CellVipPrice.text = [NSString stringWithFormat:@"%@",model.goods_vipprice];
    self.CellPrice.text = [NSString stringWithFormat:@"%@",model.goods_price];
    self.CellTime.text = [NSString stringWithFormat:@"%@",model.goods_time];
    self.CellYHName.text = [NSString stringWithFormat:@"%@",model.goods_bank];
    
}

- (void)CreateMyCodeViewCell {
    self.backgroundColor = [UIColor clearColor];
    switch (self.CellType) {
        case 1:
            {
                self.CellTypeImage.hidden = YES;
                self.CellBackImage.image = [UIImage imageNamed:[NSString stringWithFormat:@"CodeNewsImage0%ld",self.tag%3+1]];
                self.CellLabel.text = @"";
            }
            break;
        case 2:
            {
                self.CellTypeImage.hidden = NO;
                self.CellTypeImage.image = [UIImage imageNamed:@"CodeTypeImage01"];
                self.CellBackImage.image = [UIImage imageNamed:[NSString stringWithFormat:@"CodeNewsImage0%ld",self.tag%3+1]];
                self.CellLabel.text = @"";
            }
            break;
        case 3:
            {
                self.CellTypeImage.hidden = NO;
                self.CellTypeImage.image = [UIImage imageNamed:@"CodeTypeImage02"];
                self.CellBackImage.image = [UIImage imageNamed:@"CodeNewsImage04"];
                self.CellLabel.text = @"被拒原因：重复投递订单";
            }
            break;
            
        default:
            break;
    }
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
